﻿#ifndef _BASE_DEVICE_AUIDO_
#define _BASE_DEVICE_AUIDO_

#include <string.h>
#include "xcast_handler.h"

namespace Device {
namespace Audio {
namespace Listener {
class Interface {
public:
  virtual ~Interface() {}

  virtual void OnAddMic(const char* deviceId, bool add) = 0;

  virtual void OnAddSpeaker(const char* deviceId, bool add) = 0;

};

void Add(Interface* listener);

void Remove(Interface* listener);
}  // namespace Listener

namespace XcastEvent {
void OnAddMic(const char* deviceId, bool add);

void OnAddSpeaker(const char* deviceId, bool add);
}

bool IsSelectedMic(const char* device_id);

int SelectMic(const char* device_id);

uint32_t GetMicVolume(const char* device_id);

void SetMicVolume(const char* device_id, uint32_t volume);

bool IsSelectedSpeaker(const char* device_id);

int SelectSpeaker(const char* device_id);

int PreviewMic(const char* device_id, bool on);

int PreviewSpeaker(const char* device_id, bool on, const char* file_path, bool loopback, int loop_count);

int SetAccompanyMusic(bool on, const char* file_path, bool loop_back, int loop_count);

int SetSpeakerMode(bool earphone_enable);

uint32_t GetSpeakerVolume(const char* device_id);

void SetSpeakerVolume(const char* device_id, uint32_t volume);
}  // namespace Audio
}  // namespace Device
#endif

